package com.manage.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Housing {
    private Integer hid;
    private String hnumber;
    private String hname;
    private String hplace;
    private Double placearea;

    private Integer bcount;//应该是List<Building>
    private Integer rcount;

    private Double greeningrate;
    private String himage;
    private String developer;
    private String property;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date hhiredate;
    @JsonIgnore
    private String file;

    public Housing(String hnumber, String hname, String hplace, Double placearea, Double greeningrate, String himage, String developer, String property, Date hhiredate, String file) {
        this.hnumber = hnumber;
        this.hname = hname;
        this.hplace = hplace;
        this.placearea = placearea;
        this.greeningrate = greeningrate;
        this.himage = himage;
        this.developer = developer;
        this.property = property;
        this.hhiredate = hhiredate;
        this.file = file;
    }

    public Housing(Integer hid, String hnumber, String hname, String hplace, Double placearea, Double greeningrate, String himage, String developer, String property, Date hhiredate, String file) {
        this.hid = hid;
        this.hnumber = hnumber;
        this.hname = hname;
        this.hplace = hplace;
        this.placearea = placearea;
        this.greeningrate = greeningrate;
        this.himage = himage;
        this.developer = developer;
        this.property = property;
        this.hhiredate = hhiredate;
        this.file = file;
    }

    public Housing(Integer hid, String hnumber, String hname, String hplace, Double placearea, Integer bcount, Integer rcount, Double greeningrate, String himage, String developer, String property, Date hhiredate) {
        this.hid = hid;
        this.hnumber = hnumber;
        this.hname = hname;
        this.hplace = hplace;
        this.placearea = placearea;
        this.bcount = bcount;
        this.rcount = rcount;
        this.greeningrate = greeningrate;
        this.himage = himage;
        this.developer = developer;
        this.property = property;
        this.hhiredate = hhiredate;
    }

    public Housing(String hnumber, String hname, String hplace, Double placearea, Double greeningrate, String himage, String developer, String property, Date hhiredate) {
        this.hnumber = hnumber;
        this.hname = hname;
        this.hplace = hplace;
        this.placearea = placearea;
        this.greeningrate = greeningrate;
        this.himage = himage;
        this.developer = developer;
        this.property = property;
        this.hhiredate = hhiredate;
    }

    public Housing(String hnumber, String hname, String hplace, Double placearea, Integer bcount, Integer rcount, Double greeningrate, String himage, String developer, String property, Date hhiredate) {
        this.hnumber = hnumber;
        this.hname = hname;
        this.hplace = hplace;
        this.placearea = placearea;
        this.bcount = bcount;
        this.rcount = rcount;
        this.greeningrate = greeningrate;
        this.himage = himage;
        this.developer = developer;
        this.property = property;
        this.hhiredate = hhiredate;
    }
}
